package com.smart.enums;

/**
 * 三级查账部门类型枚举
 */
public enum ExportDeptEnum {
    PROVINCE("p","省"),
    CITY("c","市"),
    STATION("o","加油站"),
    MERCHANT("m","商户");

    private String code;
    private String name;
    ExportDeptEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getName(String code){
        for (ExportDeptEnum obj : ExportDeptEnum.values()) {
            if(obj.getCode().equals(code)){
                return obj.getName();
            }
        }
        return "";
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }
}
